-
Notifications
You must be signed in to change notification settings - Fork 526
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
curvefs/client: fix bug of support summary info in dir xattr #1150
Conversation
8e3d4e3
to
cc15aa4
Compare
recheck |
// inodeid to parent inodeid, may have more parent at hard link | ||
std::map<uint64_t, std::list<uint64_t>> parentIdMap_; | ||
// inodeid to parent inodeid | ||
std::map<uint64_t, uint64_t> parentIdMap_; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this only work if you turn it on?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this only work if you turn it on?
Yes, the relationship is needed when turn on the enableSumInDir flag.
3c14d0c
to
58cd8e5
Compare
@@ -1297,10 +1301,6 @@ CURVEFS_ERROR FuseClient::FuseOpRelease(fuse_req_t req, fuse_ino_t ino, | |||
return ret; | |||
} | |||
|
|||
if (enableSumInDir_) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not delete
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not delete
Oplookup will not called when vfs cached the info of inode, so if delete the relationship when release maybe lost the parent.
} | ||
LOG(WARNING) << "AddParent but exist, inodeId = " << inodeId | ||
<< ", parentId = " << parentIdMap_[inodeId] | ||
<< ", need2AddParentId = " << parentId; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check old parent and new parent are equal?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check old parent and new parent are equal?
fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (parentIdMap_.count(inodeId) && parentIdMap_[inodeId] != parentId)
what happens here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (parentIdMap_.count(inodeId) && parentIdMap_[inodeId] != parentId) what happens here?
It won't happen normally, just do anomaly detection.
…ent relationship is not correct.
recheck |
What problem does this PR solve?
Issue Number: close #xxx
Problem Summary:
What is changed and how it works?
What's Changed:
How it Works:
Side effects(Breaking backward compatibility? Performance regression?):
Check List